<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>在线工具集合</title>
    <style>
        @import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Poppins', sans-serif;
            background: linear-gradient(135deg, #0f0c29, #302b63, #24243e);
            min-height: 100vh;
            color: #fff;
            position: relative;
            overflow-x: hidden;
        }

        body::before {
            content: '';
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: radial-gradient(circle at 50% 50%, rgba(255,255,255,0.1) 0%, transparent 50%);
            pointer-events: none;
        }

        .container {
            max-width: 1200px;
            margin: 0 auto;
            padding: 40px 20px;
            position: relative;
            z-index: 1;
        }

        h1 {
            text-align: center;
            font-size: 3.5em;
            margin-bottom: 40px;
            background: linear-gradient(45deg, #00ff88, #00b4d8);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            text-shadow: 0 0 20px rgba(0, 255, 136, 0.3);
            animation: glow 2s ease-in-out infinite alternate;
        }

        @keyframes glow {
            from {
                text-shadow: 0 0 20px rgba(0, 255, 136, 0.3);
            }
            to {
                text-shadow: 0 0 30px rgba(0, 255, 136, 0.5);
            }
        }

        .tools-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
            gap: 25px;
            margin-top: 30px;
        }

        .tool-card {
            background: rgba(255, 255, 255, 0.1);
            border-radius: 15px;
            padding: 25px;
            backdrop-filter: blur(10px);
            border: 1px solid rgba(255, 255, 255, 0.1);
            transition: all 0.3s ease;
            cursor: pointer;
            text-decoration: none;
            color: #fff;
            display: block;
        }

        .tool-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
            background: rgba(255, 255, 255, 0.15);
        }

        .tool-icon {
            font-size: 2.5em;
            margin-bottom: 15px;
            color: #00ff88;
            text-align: center;
        }

        .tool-title {
            font-size: 1.2em;
            font-weight: 600;
            margin-bottom: 10px;
            text-align: center;
        }

        .tool-description {
            font-size: 0.9em;
            color: rgba(255, 255, 255, 0.8);
            text-align: center;
            line-height: 1.5;
        }

        .category-title {
            font-size: 1.8em;
            margin: 40px 0 20px;
            color: #00ff88;
            text-align: center;
        }

        .search-box {
            width: 100%;
            max-width: 600px;
            margin: 0 auto 40px;
            position: relative;
        }

        .search-input {
            width: 100%;
            padding: 15px 20px;
            border: none;
            border-radius: 12px;
            background: rgba(255, 255, 255, 0.1);
            color: #fff;
            font-size: 16px;
            backdrop-filter: blur(10px);
            border: 1px solid rgba(255, 255, 255, 0.1);
            transition: all 0.3s ease;
        }

        .search-input:focus {
            outline: none;
            border-color: #00ff88;
            box-shadow: 0 0 15px rgba(0, 255, 136, 0.2);
        }

        .search-input::placeholder {
            color: rgba(255, 255, 255, 0.5);
        }

        @media (max-width: 768px) {
            .container {
                padding: 20px 10px;
            }

            h1 {
                font-size: 2.5em;
            }

            .tools-grid {
                grid-template-columns: 1fr;
            }
        }
    </style>
</head>
<body>
    <div class="container">
        <h1>在线工具集合</h1>
        
        <div class="search-box">
            <input type="text" class="search-input" placeholder="搜索工具...">
        </div>

        <h2 class="category-title">图片工具</h2>
        <div class="tools-grid">
            <a href="tools/image-compressor.html" class="tool-card">
                <div class="tool-icon">🖼️</div>
                <div class="tool-title">图片压缩</div>
                <div class="tool-description">在线压缩图片大小，支持多种格式</div>
            </a>
            <a href="tools/image-converter.html" class="tool-card">
                <div class="tool-icon">🔄</div>
                <div class="tool-title">图片格式转换</div>
                <div class="tool-description">支持多种图片格式之间的转换</div>
            </a>
            <a href="tools/image-resizer.html" class="tool-card">
                <div class="tool-icon">📐</div>
                <div class="tool-title">图片尺寸调整</div>
                <div class="tool-description">快速调整图片尺寸大小</div>
            </a>
            <a href="tools/image-watermark.html" class="tool-card">
                <div class="tool-icon">💧</div>
                <div class="tool-title">图片水印</div>
                <div class="tool-description">添加或去除图片水印</div>
            </a>
            <a href="tools/image-cropper.html" class="tool-card">
                <div class="tool-icon">✂️</div>
                <div class="tool-title">图片裁剪</div>
                <div class="tool-description">自定义裁剪图片区域</div>
            </a>
            <a href="tools/image-grid.html" class="tool-card">
                <div class="tool-icon">⊞</div>
                <div class="tool-title">九宫格裁剪</div>
                <div class="tool-description">将图片裁剪成九宫格样式</div>
            </a>
            <a href="tools/image-bw.html" class="tool-card">
                <div class="tool-icon">◐</div>
                <div class="tool-title">黑白照片转换</div>
                <div class="tool-description">将彩色照片转换为黑白效果</div>
            </a>
            <a href="tools/image-matting.html" class="tool-card">
                <div class="tool-icon">✨</div>
                <div class="tool-title">智能抠图</div>
                <div class="tool-description">自定义选择区域进行抠图</div>
            </a>
            <a href="tools/image-rotate.html" class="tool-card">
                <div class="tool-icon">🔄</div>
                <div class="tool-title">图片旋转</div>
                <div class="tool-description">自由旋转和调整图片角度</div>
            </a>
            <a href="tools/image-flip.html" class="tool-card">
                <div class="tool-icon">⇄</div>
                <div class="tool-title">图片翻转</div>
                <div class="tool-description">水平或垂直翻转图片</div>
            </a>
        </div>

        <h2 class="category-title">文本工具</h2>
        <div class="tools-grid">
            <a href="tools/text-encoder.html" class="tool-card">
                <div class="tool-icon">🔒</div>
                <div class="tool-title">文本编码转换</div>
                <div class="tool-description">支持多种编码格式的转换</div>
            </a>
            <a href="tools/json-formatter.html" class="tool-card">
                <div class="tool-icon">{}</div>
                <div class="tool-title">JSON格式化</div>
                <div class="tool-description">JSON数据的格式化与验证</div>
            </a>
            <a href="tools/markdown-editor.html" class="tool-card">
                <div class="tool-icon">📝</div>
                <div class="tool-title">Markdown编辑器</div>
                <div class="tool-description">在线Markdown编辑与预览</div>
            </a>
        </div>

        <h2 class="category-title">开发工具</h2>
        <div class="tools-grid">
            <a href="tools/code-formatter.html" class="tool-card">
                <div class="tool-icon">💻</div>
                <div class="tool-title">代码格式化</div>
                <div class="tool-description">支持多种编程语言的代码格式化</div>
            </a>
            <a href="tools/regex-tester.html" class="tool-card">
                <div class="tool-icon">🔍</div>
                <div class="tool-title">正则表达式测试</div>
                <div class="tool-description">正则表达式的在线测试与验证</div>
            </a>
            <a href="tools/timestamp-converter.html" class="tool-card">
                <div class="tool-icon">⏰</div>
                <div class="tool-title">时间戳转换</div>
                <div class="tool-description">时间戳与日期时间的相互转换</div>
            </a>
        </div>

        <h2 class="category-title">其他工具</h2>
        <div class="tools-grid">
            <a href="tools/qrcode.html" class="tool-card">
                <div class="tool-icon">📱</div>
                <div class="tool-title">二维码生成</div>
                <div class="tool-description">生成自定义二维码</div>
            </a>
            <a href="tools/color-picker.html" class="tool-card">
                <div class="tool-icon">🎨</div>
                <div class="tool-title">颜色选择器</div>
                <div class="tool-description">在线颜色选择与转换</div>
            </a>
            <a href="tools/unit-converter.html" class="tool-card">
                <div class="tool-icon">📊</div>
                <div class="tool-title">单位转换</div>
                <div class="tool-description">常用单位之间的转换</div>
            </a>
        </div>
    </div>

    <script>
        // 搜索功能
        const searchInput = document.querySelector('.search-input');
        const toolCards = document.querySelectorAll('.tool-card');

        searchInput.addEventListener('input', (e) => {
            const searchTerm = e.target.value.toLowerCase();
            
            toolCards.forEach(card => {
                const title = card.querySelector('.tool-title').textContent.toLowerCase();
                const description = card.querySelector('.tool-description').textContent.toLowerCase();
                
                if (title.includes(searchTerm) || description.includes(searchTerm)) {
                    card.style.display = 'block';
                } else {
                    card.style.display = 'none';
                }
            });
        });
    </script>
</body>
</html> 